- var version = "/en";
- var cssPath = version+"/css/";
- var libPath = version+"/js/lib/jquery-1.12.4.min.js";
- var jadeRuntime = version+"/js/lib/runtime.js";
- var modulePath = version+"/js/modules/";
- var jobPath = version+"/js/job/";
- var imgPath = version+"/images/";
- var pagePath = version+"/";

mixin formate_money(moneyByFen, needDecimal)
    - if (moneyByFen)
        //- 分——>元
        - var moneyByYuan = moneyByFen / 100;
        - var array = (''+moneyByYuan).split('.');
        //- 整数
        - var intString =  array[0]+'';
        - intString = intString.replace(new RegExp('(\\d)(?=(\\d{3})+$)','ig'),"$1,");
        //- 小数
        - var decimalsString = array[1] ? ( '.'+array[1]+(array[1].length==2?"":"0") ) : '.00';
        //- ——>千分位
        - var _needDecimal = (typeof needDecimal == "undefined" ? true : needDecimal)
        - if (_needDecimal)
            | #{intString+decimalsString}
        - else 
            | #{intString}
    - else
        | 0

mixin html_encode(str)
    - var s = "";
    - if (str.length == 0)
        | #{s}
    - else
        s = str.replace(/&/g, "&gt;");
        s = s.replace(/</g, "&lt;");
        s = s.replace(/>/g, "&gt;");
        s = s.replace(/ /g, "&nbsp;");
        s = s.replace(/\'/g, "&#39;");
        s = s.replace(/\"/g, "&quot;");
        s = s.replace(/\n/g, "<br>");
        | #{s}
 
mixin html_decode(str)
    - var s = "";
    - if (str.length == 0)
        | #{s}
    - else
        s = str.replace(/&gt;/g, "&");
        s = s.replace(/&lt;/g, "<");
        s = s.replace(/&gt;/g, ">");
        s = s.replace(/&nbsp;/g, " ");
        s = s.replace(/&#39;/g, "\'");
        s = s.replace(/&quot;/g, "\"");
        s = s.replace(/<br>/g, "\n");
        | #{s}